import axios from "axios";
import AdminsApi from "../api/admins"

axios.interceptors.request.use(function (config) {
    const token = AdminsApi.getToken();
    token && (config["headers"]["authorization"] = `Bearer ${token}`);
    return config;
}, function (error) {
    // Do something with request error
    return Promise.reject(error);
});